﻿{#template MAIN}
<table id="gridProgram" cellpadding="5" cellspacing="0" class="grid">
    <thead>
        <th>
        </th>
        <th style="display: none">
            Program ID
        </th>
        <th style="display: none">
            Day #
        </th>
        <th>
            Day of route
        </th>
        <th>
            Activity
        </th>
        <th>
            Hotel Pickup
        </th>
        <th>
            Service #
        </th>
        <th>
            Name
        </th>
        <th>
            Service Type
        </th>
        <th style="display: none">
            Service ID
        </th>
        <th style="display: none">
            ServiceTypeID
        </th>
        <th>
            <a class="btnNew">Program</a>
        </th>
    </thead>
    <tbody>
        {#foreach $T.List as program}
        <tr class="{#cycle values=['','evenRow']}">
            {#include ROW root=$T.program}
            <td>
                <a programid='{$T.program.RouteServiceID}' class="btnEdit new">Edit</a> {#if $T.IsAdmin
                } |&nbsp;<a programid="{$T.program.RouteServiceID}" class="btnDelete new">Delete</a>
                {#/if}
            </td>
        </tr>
        {#/for}
    </tbody>
    <tfoot>
        <th colspan="2">
            <a href="javascript:void(0)" style="color: #111" onclick="moveUp()">Move Up</a>
        </th>
        <th>
            <a href="javascript:void(0)" style="color: #111" onclick="moveDown()">Move Down</a>
        </th>
        <th colspan="8">
        </th>
    </tfoot>
</table>
{#/template MAIN} {#template ROW}
<td>
    <input type="checkbox" class="chkService" />
</td>
<td style="display: none">
    {$T.RouteServiceID}
</td>
<td style="display: none">
    {$T.DayOfRoute}
</td>
<td align="center">
    {showDay($T.DayOfRoute)}
</td>
<td>
    {$T.Program}
</td>
<td>
    {$T.HotelPickupAddress}
</td>
<td>
    {#if $T.Service != null }{$T.Service.ServiceCode}{#else}{#/if}
</td>
<td>
    {#if $T.Service != null }{$T.Service.ServiceName}{#else}{#/if}
</td>
<td>
    {$T.ServiceTypeName}
</td>
<td style="display: none">
    {$T.ServiceID}
</td>
<td style="display: none">
    {$T.ServiceType}
</td>
{#/template ROW}